import axios from "@/services/index";

interface SearchType {
    pageNo: number;
    pageSize: number;
    contractNo: string;
    contact: string;
    tel: string;
}

export interface ContarctData {
    contractNo: string;
    type: string;
    name: string;
    startDate: string;
    endDate: string;
    partyA: string;
    partyB: string;
    status: string;
}

interface ContarctDataType {
    list: ContarctData[];
    total: number;
    pageNo: number;
    pageSize: number;
}

export async function getContractListService(params: SearchType) {
    const result = (await axios.post('/contractList', params)) as ContarctDataType;
    return result;
}